<?xml version="1.0" encoding="UTF-8"?>
<shuie order="50" active="true">
  <title><![CDATA[Wikis]]></title>
  <contexts>
    <context active="true">
      <baseTemplate><![CDATA[119]]></baseTemplate>
        <pageMode>
        <invalid>true</invalid>
      </pageMode>
    </context>
  </contexts>
  <javascript minify="true">
    <code>
      <![CDATA[
$(document).ready(function(){
  $(".ms-wikicontent div").prepend("<table id=wikiToc />");
   
  $("#wikiToc")
    .append("<thead id=wikiTocHead />")
    .append("<tbody />")
    .addClass("ms-propertysheet")
    .addClass("ms-bodyareaframe")
    .css("float","right")
    .css("width","150px")
    .css("height","auto")
    .css("font-size","1em")
    .css("padding","2px")
    .css("margin-left","10px")
    .css("margin-right","0")
    .css("margin-bottom","10px");
  
  $("#wikiToc tbody").append("<tr />");
  $("#wikiToc tbody tr").append("<td />");
  $("#wikiToc tbody tr td").append("<div id=wikiTocContainer />");
  $("#wikiTocContainer")
    .css("padding","10px;")
    .append("<ul id=wikiTocBody />");
    
  $("#wikiTocHead")
    .html("<tr><th>Table of Contents</th></tr>");

  var wikiTocId = 0;
  $(".ms-wikicontent font").each(function() {
    var element = $(this);
    
    if (!$.trim(element.text()))
      return;
    
    wikiTocId++;
    element.prepend("<a name=''toc" + wikiTocId + "''></a>");
  
    var liopen = "";
    var liclose = "";
    for (var ii = element.attr("size"); ii < 7; ii++) {
		liopen = liopen + "<ul>";
		liclose = liclose + "</ul>";
    }
  
    $("#wikiTocBody")
	  .append(
	    liopen +
	    "<li><a class=''ms-wikicontent ms-wikilink'' href=''#toc" + wikiTocId + "''>" +
	    element.text() +
	    "</a></li>" +
	    liclose
	  );
    
    $("#wikiTocContainer ul")
      .css("list-style-type","circle")
      .css("margin","0")
      .css("margin-left","1em")
      .css("padding","0")
      .css("text-indent","0")
      .css("line-height","1");
  });
  
});
      ]]>
    </code>
  </javascript>
</shuie>
